#pragma once
#include "globals.h"

class CECGFile
{
private:	
	static CECGFile * m_pThis;

public:
	CECGFile(void);
	~CECGFile(void);

	static CECGFile * GetMe ();
	static void Delete ();
	static void Create ();

public:
	BOOL ECGReadFile(ECG_DATA_DEF* pECGData, const char* szFilePathName);
	BOOL ECGWriteFile(const ECG_DATA_DEF* ppECGData, const char* szFilePathName);
	BOOL BuildECGData(signed char* pData, ECG_DATA_DEF* pECGData,char langType=1); // 1=CHN, 2=ENG,3=RUS

	BOOL ECGWriteFDAXMLFile(const ECG_DATA_DEF* ppECGData, const char* szFilePathName, char* szErrorMsg);

private:
	BOOL ECGDataConvert(signed char* pData, const ECG_DATA_DEF* pECGData, BOOL bECGDataRR = FALSE);
	BOOL ECGDataConvertFDAXML(const char* szFilePathName, const ECG_DATA_DEF* pECGData, char* szErrorMsg);

//private:
//	ECGMachineType _ecgMacType;
//
//public:
//	ECGMachineType ECGMachineTypeGet();
//	void ECGMachineTypeSet(ECGMachineType ecgMacType);
};
